package com.tonann.common.constant;

/**
 * 缓存的key 常量
 *
 * @author ruoyi
 */
public class CacheConstants
{
    /**
     * 登录用户 redis key
     */
    public static final String LOGIN_TOKEN_KEY = "login_tokens:";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 用户管理 cache key
     */
    public static final String SYS_USER_KEY = "sys_user:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";
    /**
     * 网关管理 cache key
     */
    public static final String APP_GATEWAY_KEY = "app_gateway:";
    /**
     * 设备管理 cache key
     */
    public static final String APP_DEVICE_KEY = "app_device:";
    /**
     * 传感器管理 cache key
     */
    public static final String APP_SENSOR_KEY = "app_sensor:";
    /**
     * 传感器管理 cache key
     */
    public static final String APP_SENSOR_VALUE_KEY = "app_sensor:deviceId:";
    /**
     * 传感器管理 cache key
     */
    public static final String APP_SENSOR_TIME_VALUE_KEY = "app_sensor:time:deviceId:";
    /**
     * 告警规则管理 cache key
     */
    public static final String APP_FAULT_RULE_KEY = "app_fault_rule:";

    /**
     * 防重提交 redis key
     */
    public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";

    /**
     * 限流 redis key
     */
    public static final String RATE_LIMIT_KEY = "rate_limit:";

    /**
     * 登录账户密码错误次数 redis key
     */
    public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";

    public static final Long APP_SENSOR_VALUE_EXPIRE = 365L * 24 * 3600;
}
